#include<iostream>
#include<format>
#include<cmath>
using namespace std;
int main()
{
  double n,sum=1,j=1,k;
  cin>>n;
  for(int i=1;i<=n;i++)
  {
    j*=i;
    sum+=1/j;
  }
  cout.precision(10);
  cout<<fixed;
  cout<<sum;
}